<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
    <link rel="shortcut icon" href="{$mipInfo.domain}/favicon.ico?v={$mipInfo.scriptVersion}" type="image/x-icon" />
    <title>{block name="title"}{/block}{$mipInfo['siteName']}管理后台</title>
    <base href="{$mipInfo.domain}" />
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
    <link href="https://cdn.bootcss.com/iview/3.5.4/styles/iview.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="{$mipInfo.domain}/assets/admin/css/admin.css?v={$mipInfo.scriptVersion}"/>

    <style type="text/css">
      [v-cloak] {
        display: none;
        }
        .ivu-modal-close {
            z-index: 999;
        }
    </style>
    {block name="style"}
        
    {/block}
</head>
<body class="mip-admin">
    <section id="mipcms">
            
        <header id='header' class="mip-header clearfix b-b">
            <div class="mip-logo">
                <div class="mip-logo-a"><a href="{$mipInfo.domain}/{$Think.config.admin}/">管理系统后台</a><span class="sub-v"></span></div>
            </div>
            <ul class="header-switch">
                <li><a href="{$mipInfo.domain}/{$Think.config.admin}/" class="link"><Icon type="ios-home-outline"></Icon> 核心管理</a></li>
                <li class="link "><a class="link" href="{$mipInfo.domain}/{$Think.config.admin}/addons/addons" >
                    <Icon type="md-basket" ></Icon>  插件管理 </a></li>

            </ul>
            <div class="mip-user-info" v-cloak>
                <ul class="nav navbar-nav navbar-right">
                     <Dropdown trigger="hover" >
                        <a href="javascript:void(0)">
                            {$Request.session.userInfo.nickname} 【管理员】
                            <Icon type="arrow-down-b"></Icon>
                        </a>
                        <Dropdown-Menu slot="list">
                            <li class="ivu-dropdown-item" @click='editPassword'>修改密码</li>
                            <li class="ivu-dropdown-item" @click='loginOut'>安全退出</li>
                        </Dropdown-Menu>
                    </Dropdown>
                </ul>
            </div>
        </header>
        <main class="mip-main clearfix" >
                <aside id="menu" class="mip-menu hidden-xs">
                   <div class="menu-wrap">
                        <div class="menu-content sidebar-menu">
                            {$thtml}
                        </div>
                    </div>
                </aside>
                <section class="mip-container" id="app">
                    {block name="main"}
                    {/block}
                </section>
          </main>
      
    </section>
    {block name="dialog"}{/block}
</body>
{block name="javascript"}
<script src="https://cdn.bootcss.com/babel-polyfill/7.0.0-rc.4/polyfill.min.js"></script>
<script src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.min.js"></script>
<script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>
<script src="https://cdn.bootcss.com/vue-router/3.0.1/vue-router.min.js"></script>
<script src="https://cdn.bootcss.com/iview/3.5.4/iview.min.js"></script>
<script src="{$mipInfo.domain}/assets/common/js/flybird-ajax.js?v={$mipInfo.scriptVersion}" type="text/javascript" charset="utf-8"></script>
<script src="{$mipInfo.domain}/assets/admin/js/mipcms-admin.js?v={$mipInfo.scriptVersion}" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	$(document).ready(function() {
    var animationSpeed = 200;
    $('.sidebar-menu').on('click', 'li.has-sub>a', function(e) {
        e.preventDefault();
        var $this = $(this);
        if($this.attr('href')){
            location.href=$this.attr('href');
            return;
        }

        var nextElem = $(this).next();
        if (nextElem.parent("li").is('.active')) {
            nextElem.css('display','block');
            nextElem.slideUp(animationSpeed, function() {
                //收起
                nextElem.parent("li").removeClass("active");
            });
        } else {
            var subUl = $('.sidebar-menu .has-sub');
            subUl.find('ul:visible').slideUp(animationSpeed, function() {
                //收起
                subUl.removeClass("active");
            });
            nextElem.slideDown(animationSpeed, function() {
                //展开
                nextElem.parent("li").addClass("active");
            });
        }
      });
});
</script>
<script type="text/javascript">
	 new Vue({
        el: '#header',
        data: {
            displayBlick: true,
        },
        watch: {
        },
        mounted() {
        },
        methods: {
            loginOut() {
               this.$mip.ajax('{$mipInfo.domain}/user/ApiAdminAuth/loginOut', {
                }).then(res => {
                    if (res.code == 1) {
                        this.$Message.error(res.msg);
                        location.href = '{$mipInfo.domain}/{$Think.config.admin}';
                    }
                });
            },
            editPassword() {
                location.href = '{$mipInfo.domain}/{$Think.config.admin}/user/account';
            }
         }
    })
</script>
{/block}


</html>